/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package jpaintball;

import java.awt.FlowLayout;
import javax.swing.BoxLayout;
import javax.swing.JDialog;
import javax.swing.SpringLayout;

/**
 *
 * @author ondra
 */
public class Dialog extends JDialog {

    GameWindow owner;

    Dialog(String title,GameWindow _owner) {
        super(_owner, true);
        this.setTitle(title);
        setResizable(false);
        this.setLayout(new FlowLayout());

        owner = _owner;
    }

    protected void showDialog() {
        // center window
        pack();
        setLocationRelativeTo(null);
        setVisible(true);
    }
    protected void closeDialog() {
        setVisible(false);
    }

}
